1. Field of the Invention
The present invention relates to an apparatus and a method for increasing the number of keys in the key-matrix, and more particularly to an improved key-matrix.
2. Description of the Prior Art
For a typical ready made key-matrix, it is difficult to increase the number of keys in the unchanged original IC design. For example, as illustrated in FIG. 1, it shows a 4xc3x97matrix of electronic keyboard, wherein the scanning circuit 10 uses seven I/O ports (R1-R4, C1-C3) and the key-matrix merely can provides 12 keys at most. Therefore, if more keys are needed, it is necessary to redesign one IC to increase I/O pins for increasing the number of keys. Such method not only increases the cost but also delays the time to market. Currently, there are some methods for increasing the number of keys by a power line and a ground line, for example, U.S. Pat. No 5,463,386 entitled xe2x80x9cElectrical matrix keyboard scanning circuit xe2x80x9d by Wu Chyi-Chang and U.S. Pat. No. 5,554,985 entitled xe2x80x9cMethod for scanning keypad architecture employing power source and ground of digital electronic devicesxe2x80x9d. As illustrated in FIG. 2, it shows a original 4xc3x97matrix of electronic keyboard with 12 keys as shown in FIG. 1 being expanding and increasing to be 19 keys ((4+1)xc3x97(3+1)xe2x88x921) by utilizing the method of Wu. The method can increase the number of keys under the condition of unchanging ready made the number of I/O ports. However, when the designed IC which have been adopted with the prior art is required to increase some keys to execute some extra functions, the original IC has used all of the keys or the IC requirement exceeds the reserve number of keys, and the original key-matrix can not accommodate more keys. Therefore, the only way for redesigning one IC is to increase I/O ports to execute extra functions. However, if we only need few number of keys to execute some extra functions, the above method for redesigning one IC will waste money and delay the time to market. In accordance with the above description, to avoid increasing the cost for redesigning one IC and delaying the sale, the key-matrix can increase some keys in a un-changing original key-matrix design just by increasing some extra diodes in the key-matrix and changing the scanning method in the scanning circuit.
As illustrated in FIG. 1, the scanning method of electronic keyboard has two types, one is positive logic and the other is negative logic. In the state of negative logic, first, the key-matrix scans rows and it sets rows (R1-R4) with high resistance and high voltage, and it sets columns (C1-C3) with low resistance and low voltage. Then if a key in rows (R1-R4) is pressed, one of the row ports (R1-R4) will be detected the low voltage, and the voltage data will be latched by the latch circuit, then the key-matrix stores the state of row ports (R1-R4) into the memory structure (QR1-QR4) in the scanning circuit 10. Then, the key-matrix changes the scanning method for scanning columns, and it sets columns (C1-C3) with high resistance and high voltage, and it sets rows (R1-R4) with low resistance and low voltage. At this time, one of the column ports (C1-C3) will be detected in low voltage, and the voltage data will be latched by the latch circuit, then the key-matrix stores the state of the column ports (C1-C3) into the memory structure (QC1-QC3) in the scanning circuit 10. Accordingly, the location of pressed key can be determined correctly by the memories structure (QR1-QR4 and QC1-QC3).
As illustrated in FIG. 2 again, it is a scanning method of electronic keyboard with a power line and a ground line for inputting . In the state of negative logic, first, the key-matrix scans rows and sets rows (R1-R4) with high resistance and high voltage ,and it sets columns (C1-C3) with low resistance and low voltage. Then if a key is pressed in rows (R1-R4), one of the row ports (R1-R4) will be detected at the low voltage. However, if a key in the power line is pressed, one of the column ports (C1-C3) will be detected with a high voltage, and row ports (R1-R4) will maintain at the initial high voltage. According to the stated above, the key-matrix checks the voltage state of row ports and column ports to determine whether there is any key to be pressed, and then the key-matrix stores the voltage state of row ports (R1-R4) into the memory structure (QR1-QR4) in the scanning circuit 20. Additionally, if a key in the power line is pressed, the key-matrix also stores the voltage state of column ports (C1-C3) into the memory structure (QC1-QC3) in the scanning circuit 20. Then, the key-matrix changes the scanning method for scanning columns and it sets columns (C1-C3) with high resistance and high voltage ,and it sets rows (R1-R4) with low resistance and low voltage. Then if a key in columns (C1-C3) is pressed, one of the column ports (C1-C3) will be detected with low voltage. Then, the key-matrix stores the voltage state of column ports (C1-C3) into the memory structure (QC1-QC3) in the scanning circuit 20. However, if a key in the ground line is pressed, the column ports (C1-C3) will maintain at initial high voltage. Additionally, if the key-matrix has detected a key in the power line being pressed by previous row scanning, the key-matrix will not store the current voltage state of column ports (C1-C3) into the memory structure (QC1-QC3) in the scanning circuit 20 after columns scanning, and it will still maintain the previous state value of the memory structure (QC1-QC3) before columns scanning. Accordingly, the location of pressed key can be determined correctly by the memory structure (QR1-QR4 and QC1-QC3).
As illustrated in FIG. 3A and FIG. 3B, they show the conventional scanning method. When a key is pressed, the row port and the column port are short. For example, the circuit sets the row port with high resistance and high voltage, and it sets the column port with low resistance and low voltage. When a key is pressed, the row port will be pulled down to a low voltage. However, if there is not any key to be pressed, the row port and the column port will be unchanged in voltage. By this way, the detected circuit can determine whether any key should be pressed. In general, when the key-matrix scans, the scanning method is xe2x80x9cbi-direction detectingxe2x80x9d. In other word, when a switch between a row and a column is pressed, the voltage data of a row or a column will be changed, and the key-matrix can only used to determine whether any key be pressed according to the change of the voltage data in a row or a column. The theorem can just beused to determine whether the key is conductive between a row and a column. And the conductive direction will not beconfirmed. Therefore, if the scanning method for bi-dircetion can be changed to the method for uni-direction, the same dectected circuit can increase some keys.
It is an object of present invention to provide an improved key-matrix apparatus which is particularly suitable for the unchanged original key-matrix to increase some rooms for extra function keys.
It is another object of present invention to provide a method for increasing some keys, wherein the method is that diodes are in series with keys being detected by different conductive direction, and the method can save the cost of redesigning and advance the sale.
In accordance with the above-stated, the present invention provides an apparatus and a method for increasing keys in the ready-made key-matrix. The method is that setting diodes being in series with keys in the key-matrix and detecting whether the key is pressed in the circuit by detecting whether the diodes are conductive. By this way, the ready-made key-matrix can rapidly increase some keys. In general, in the uni-direction detecting circuit, a diode merely can determine one key by detecting diode conductivity in uni-direction. Therefore, when diodes are detected by different conductive directions such as bi-direction (forward-direction and reversed-direction), the circuit can detect more keys, wherein the diodes are in series with keys and the diodes have different conductive directions. By this method, the present invention can change a non-directional key switch (bi-direction conductivity) into a directional key switch (bi-direction conductivity) to increase the number of keys in the ready-made key-matrix. For example, the original keyboard with Mxc3x97N keys will expand to 2xc3x97Mxc3x97N or 3xc3x97Mxc3x97N keys. However, it is necessary to increase some extra diodes in the circuit, and the cost will become very expensive. Therefore, the present invention is particularly suited for increasing a little extra function keys in the ready-made key-matrix.